package cn.regexp.job.feign.fallback;


import cn.regexp.common.core.domain.SeckillProductVo;
import cn.regexp.common.core.web.Result;
import cn.regexp.job.feign.SeckillProductFeignApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Regexpei
 * @date 2024/7/5 22:51
 * @description 秒杀商品远程调用降级类
 */
@Slf4j
@Component
public class SeckillProductFeignFallback implements SeckillProductFeignApi {

    @Override
    public Result<List<SeckillProductVo>> selectByType(int time) {
        log.error("调用lego-shop-service-seckill服务异常，进入降级方法");
        return Result.success(new ArrayList<>());
    }
}
